<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script>
    test(() => assert_selection(
        [
            '<div contenteditable>',
                '<span>a<img src="../resources/abe.png">new <br>foo |<i> </i> <img src="../resources/abe.png"> conceived</span>',
            '</div>',
        ].join(''),
        selection => {
            for (var i = 0; i < 4; ++i)
                selection.document.execCommand('delete');
        },
        [
            '<div contenteditable>',
                '<span>a<img src="../resources/abe.png">new <br>|<img src="../resources/abe.png"> conceived</span>',
            '</div>',
        ].join('')),
        'Delete command deletes a redundant I element.');
</script>
